﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Automted_Bank_teller
{
    public partial class ClientLoginForm : Form
    {
        public ClientLoginForm()
        {
            InitializeComponent();
        }

        private void BTN_ClientLogin_Login_Click(object sender, EventArgs e)
        {
            Login_Logic client_login = new Login_Logic();
            client_login.Set_data_for_ClientLogin(txtbox_clientlogin_clientID.Text , txtbox_clientLogin_PinCode.Text);

            if (txtbox_clientlogin_clientID.Text.Length > 0 && txtbox_clientLogin_PinCode.Text.Length > 0)
            {
                Login_Process complete_login = new Login_Process();
                complete_login.Database_ConnectString();
                complete_login.Open_Database();
                complete_login.Select_login();
                complete_login.Close_Database();
                MessageBox.Show("Client ID or PINCode my be Invalid");
            }
            else
            {
                MessageBox.Show("Empty Fields Not allowed");
            }

        }

        private void BTN_ClientLogin_Reset_Click(object sender, EventArgs e)
        {
            txtbox_clientlogin_clientID.Clear();
            txtbox_clientLogin_PinCode.Clear();
        }

    }

}
    

